//Source file: I:\\ISS\\UNIT3\\JAVA PACKAGE\\edu\\nus\\iss\\t5\\jass\\entity\\JobResponse.java

package edu.nus.iss.t5.jass.entity;

import java.util.Date;


/**
 * This Class represents Job Response Entity. It also can be used as a data
 * transfer object to pass value across easch MVC layers.
 */
public class JobResponse
{

   /**
    * Unique Identify For JobResponse entity.
    */
   private String id;

   /**
    * The date and time that the job seeker response to this Job Advertisment.
    */
   private Date responseDate;

   /**
    * This is job seeker's resume which inputted by Job seeker when he/she response
    * to this job advertisement.
    */
   private String resume;


   private JobSeeker jobSeeker;

   private JobAdvertisement jobAdvertisement;

    /**
     * Get Job Response ID
     * @return the id
     */
    public String getId() {
        return id;
    }

    /**
     * Set Job Response ID
     * @param id the id to set
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * Get Job Response date
     * @return the responseDate
     */
    public Date getResponseDate() {
        return responseDate;
    }

    /**
     * Set Job Response Date
     * @param responseDate the responseDate to set
     */
    public void setResponseDate(Date responseDate) {
        this.responseDate = responseDate;
    }

    /**
     * Get Job Response Resume.
     * @return the resume
     */
    public String getResume() {
        return resume;
    }

    /**
     * Set Job Response resume
     * @param resume the resume to set
     */
    public void setResume(String resume) {
        this.resume = resume;
    }


    /**
     * get Job Seeker
     * @return the jobSeeker
     */
    public JobSeeker getJobSeeker() {
        return jobSeeker;
    }

    /**
     * set Job Seeker
     * @param jobSeeker the jobSeeker to set
     */
    public void setJobSeeker(JobSeeker jobSeeker) {
        this.jobSeeker = jobSeeker;
    }

    /**
     * Get Job Advertisement Object
     * @return the jobAdvertisement
     */
    public JobAdvertisement getJobAdvertisement() {
        return jobAdvertisement;
    }

    /**
     * Set Job Advertisement
     * @param jobAdvertisement the jobAdvertisement to set
     */
    public void setJobAdvertisement(JobAdvertisement jobAdvertisement) {
        this.jobAdvertisement = jobAdvertisement;
    }

    /**
     * Override equals method.
     * @param obj
     * @return true: if the given object equals with current object.
     * false: if the given object does not equal with current object.
     */
    @Override
    public boolean equals(Object obj)
    {
        boolean bResult=false;
        if(obj instanceof JobResponse)
        {
            JobResponse response=(JobResponse)obj;
            if(response.getId().equals(this.getId()))
                bResult=true;
        }

        return bResult;
    }

    /**
     * get current object's hash code.
     * @return The object's hash code.
     */
    @Override
    public int hashCode() {
        int hash = 5;
        hash = 67 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }
}
